package com.zmn.oms.common.constant;

/**
 * 类描述：Open-Api使用的常量
 *
 * @author LiangHailong
 * @date 2019/12/23 18:53
 */
public final class OpenApiConsts {

    /* *********** FunId ************/
    public static final String FUNID_NEW_ORDER = "new_order";     // 同步新单
    public static final String FUNID_DUTY_TIME = "duty_time";      // 同步预约时间
    public static final String FUNID_MASTER_INFO = "master_info";    // 同步领单工程师
    public static final String FUNID_MASTER_VISIT = "master_visit";    // 同步领单工程师
    public static final String FUNID_ORDER_SUSPEND = "order_suspend";    // 同步订单挂起
    public static final String FUNID_SERVICE_COMPLETE = "service_complete"; // 同步服务完成
    public static final String FUNID_ORDER_COMPLETE = "order_complete";  // 同步订单完成
    public static final String FUNID_ORDER_CANCEL = "order_cancel";     // 同步订单取消
    public static final String FUNID_FACTORY_REMARK = "factory_remark";     // 同步订单取消
    /* ***********  ************/

    /**
     * 通知状态
     */
    public final static int NOTIFY_STATUS_INPUT = 11; // 提交订单
    public final static int NOTIFY_STATUS_CONFIRM = 21; // 确认订单
    public final static int NOTIFY_STATUS_DISTRIBUTE = 41; // 成功派单
    public final static int NOTIFY_STATUS_SUSPEND = 50; // 订单挂起
    public final static int NOTIFY_STATUS_TAKE = 51; // 工程师接单
    public final static int NOTIFY_STATUS_VISIT = 61; // 服务上门
    public final static int NOTIFY_STATUS_SERVICE_COMPLETE = 70; // 服务完成
    public final static int NOTIFY_STATUS_COMPLETE = 71; // 订单完成
    public final static int NOTIFY_STATUS_CANCEL = 81; // 服务取消
    // 此处规定：9开头的不标识订单状态，只标识操作
    public final static int NOTIFY_STATUS_FACTORY_REMARK = 91; // 商家备注

    /**
     * 查询通知状态名称
     *
     * @param notifyStatus
     * @return
     */
    public static String getNotifyStatusName(int notifyStatus) {

        switch (notifyStatus) {
            case NOTIFY_STATUS_INPUT:
                return "提交订单";
            case NOTIFY_STATUS_CONFIRM:
                return "确认订单";
            case NOTIFY_STATUS_DISTRIBUTE:
                return "成功派单";
            case NOTIFY_STATUS_TAKE:
                return "工程师接单";
            case NOTIFY_STATUS_SUSPEND:
                return "订单挂起";
            case NOTIFY_STATUS_VISIT:
                return "服务上门";
            case NOTIFY_STATUS_SERVICE_COMPLETE:
                return "服务完成";
            case NOTIFY_STATUS_COMPLETE:
                return "订单完成";
            case NOTIFY_STATUS_CANCEL:
                return "服务取消";
            case NOTIFY_STATUS_FACTORY_REMARK:
                return "商家备注";
            default:
                return "未知";
        }
    }

    /**
     * 私有构造器，禁止外部实例化
     */
    private OpenApiConsts() {}
}
